package com.xpchenfrank.controller;

import com.xpchenfrank.common.response.RestResponse;
import com.xpchenfrank.entity.WsmDirector;
import com.xpchenfrank.entity.WsmReseller;
import com.xpchenfrank.mapper.WsmCarMapper;
import com.xpchenfrank.mapper.WsmDirectorMapper;
import com.xpchenfrank.service.StockService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author xpchen
 * @time 2018/3/7 17:50
 * @Description
 * @copyright Wuxi Yazuo ,Ltd.copyright 2015-2025
 */
@Slf4j
@RestController
@RequestMapping("director")
public class DirectorController {

    @Resource
    StockService stockService;

    @Resource
    WsmDirectorMapper wsmDirectorMapper;

    @ResponseBody
    @RequestMapping(value = "/save", method = RequestMethod.POST,
            produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
    public RestResponse save(@RequestBody WsmDirector wsmDirector) {
        wsmDirectorMapper.insertSelective(wsmDirector);
        return RestResponse.success();
    }
}
